home *** CD-ROM | disk | FTP | other *** search
-
- The Map Program
-
- Version 2.7, 1 April 1991
-
-
- I was interested in techniques for producing maps, and found
- the article by William D. Johnston in the May and June 1979 Byte
- Magazine. This two part article provided an excellent
- introduction and source code in Basic language. His code was
- restricted to the algorithms and did not get involved with user
- interface. To evaluate his algorithms and try out the displays I
- coded the program and a simple interface in Borland C++.
-
- The program in its current form is highly based on Mr. Johnston's
- algorithms and provides no significant additional capabilities.
-
- I also found a high resolution database called the Micro
- World Data Bank II (MWDB II). This database was 1 megabyte in
- length and good down to minutes of a degree. Public Brand
- Software has this database on disk (Address below).
-
- Another database that is useful is called "The World
- Digitized". This is a lower resolution database than MWDB II but
- is quite popular. The program CONVERT.EXE will perform a
- translation on the .MPS files to combine and convert them to
- MWDB II format. I use a hard disk so I don't know if this program
- is useful to floppy only users. The Public (Software) Library
- has this database on disk (Address below).
-
- To run the program and receive help you use the DOS
- common method of the question option "/?". Just type "map/?" and
- the following usage help will be displayed:
-
- Usage: map [/bcdgilmrsxy]
-
- /b Boundaries Off
- /c Countries On
- /dn Database ('MWDBII' Default)
- /g Grid lines On
- /i Islands Off
- /l Lakes Off
- /mn Map Resolution (5 Default)
- /r Rivers On
- /s States On
- /x Colors On
- /y BIOS Video Mode On
-
- Defaults to Boundaries and Islands On
-
- The defaults are what I thought should be fairly common.
- The map database has 5 resolutions, and can be selected with the
- 'm' option. 5 is the lowest resolution and 1 is the greatest.
- If you have several different databases you can use the 'd'
- option and provide the path and filename (128 Characters max).
- The 'm' and 'd' options should be placed at the end. They can be
- put anywhere but it's a little easier at the end. Example:
-
- map/glrsm1
-
- If you use the option in the middle you will need to put a space
- between it and the remaining options. Example:
-
- map/gldworld /rs
-
- These are the most foolproof methods.
-
- A little about the speed of the result. The program is quite
- slow on an 8088 without a math coprocessor, and speed is getting
- acceptable on an 80286. The C language standard uses double
- precision math. This is a waste with the current database
- resolution. An integer version of the math routines would sure
- speed up the program quite a bit. The map program uses Borland
- auto detect of a math coprocessor and graphics device type (EGA
- and Low-Res VGA, as well as HERC and good old CGA).
-
- If you want to quit the plotting on the screen, just hit
- any key and a bell and prompt will appear to ask if you want to
- quit. By saying yes gets you back to DOS. You can also use
- Control-C or Control-Break to get out while drawing. When
- finished the word "Done" is displayed. If you press a key here -
- poof! you lose it.
-
- The MWDB II map starts off near the Mekong Delta. It may
- take a while to get to where you want your map centered on. The
- "World" database can be configured any way you like using the
- CONVERT.WRK file and then running CONVERT.EXE on it. Both
- databases have errors that can be fixed. The "World" database of
- African political boundaries seems misplaced? And the Pacific
- data seems to extend to 190 degrees?? The MWDB II has islands
- north of Canada in the Lake database.
-
- The following example orients the world to Los Angeles Intl Apt.
- and its start of runway 24 Left. If you look close you can see
- airplanes going down the runway...
-
- West Longitudes and South Latitudes are negative
-
- Latitude of the map center [+-]dd.mm : 33.57
- Longitude of the map center [+-]ddd.mm : -118.24
-
- Select from the following options:
-
- 1 - Perspective Projection
- 2 - Modified Perspective Projection
- 3 - Azimuthal Equidistant Projection
-
- Choice : 1
-
- Observer altitude (km) : 10000
- Observer facing azimuth (0 - 359 degrees) : 0
-
-
- -------
-
- There are quite a few EGA screen printing programs, but the
- first I came across was Pizazz!. You load this program first
- into memory (it's known as a TSR program - Terminates and Stays
- Resident) and then you press the Shift-PrtSc keys when the map
- drawing is complete. The program will then allow you to crop
- the picture and adjust the aspect ratio for just about every
- printer known to man (Laser also). To order Pizazz! see the
- address below, I recommend it.
-
- -------
-
- Thanks to:
-
- BYTE Magazine editors and publishers
- Mr. Johnston for his great article and algorithms
- Fred Pospeshil and Antonio Riveria for the database
-
- All in all - A most enjoyable and interesting subject and pastime.
- If you get tired of looking at the world, use EXE files for data:
-
- map /d\bc\bin\bc.exe
-
- -------
-
- Public (Software) Library (MAP, World Digitized)
- P.O. Box 35705
- Houston, Texas, 77235-5705
- 713-665-7017 (@ $25)
-
- Public Brand Software (MWDB II)
- P.O Box 51315
- Indianapolis, IN 46251
- 800-426-DISK (@ $25)
-
- Programmers Connection (Pizazz!)
- 7249 Whipple Ave NW
- North Canton, OH 44720
- 800-336-1166 (@ $50)
-
- Steve R. Sampson
- CompuServe: 75136,626